1. Field of the Invention
The present invention relates to read-only-memory (ROM) flashing, and more particularly to a method for flashing Extended System Configuration Data (ESCD) and variables into a ROM of a computer system.
2. Description of the Related Art
In order to support the automatic configuration of Plug and Play devices on platforms that include a standard expansion bus, non-volatile storage such as CMOS RAM, ROM, or NVRAM is used to store information about system resources used by non-Plug and Play devices in a computer system. This configuration information is typically stored in an Extended System Configuration Data (ESCD) format. The ESCD format accommodates storage of configuration information for Plug and Play devices and non-Plug and Play devices. ESCD generally allows Plug and Play System Basic Input Output Services (BIOS) code to more fully configure a computer system at power up by specifying the system resources assigned to devices that have been installed in the system. The portion of non-volatile storage used to store the ESCD may be only a subset of the total non-volatile storage available in a computer system.
System BIOS code is used by the operating system to read or write ESCD as the non-volatile storage storing ESCD has traditionally resided in the system BIOS memory space. Accordingly, only system BIOS has known the location of the ESCD in the non-volatile storage and the proper method for accessing the non-volatile storage. If the non-volatile storage is memory-mapped, the physical base address of the memory mapped non-volatile storage allows a "caller," such as an operating system, to construct a segment descriptor pointed to by a memory pointer known as a segment selector. If a function to read or write ESCD is called from a protected mode, the segment descriptor is created from a protected mode base segment address typically termed an ESCD Selector parameter. If a function to read or write ESCD is called from real mode, a segment descriptor is created from a real mode base segment address typically termed a BIOS Selector parameter. A segment selector serves as a pointer to a segment descriptor for an ESCD area of non-volatile storage. In addition, a function to read or write ESCD generates a pointer to the size of ESCD for determining an entry point into the ESCD. A function to read ESCD transfers ESCD from an ESCD area of non-volatile storage to a memory buffer typically having a pointer termed ESCD Buffer, and a function to write ESCD transfers data from the memory buffer to an ESCD area of non-volatile storage. ESCD functions are further described in the Extended System Configuration Data Specification, Version 1.02, published on Feb. 14, 1994, by Compaq Computer Corporation, Intel Corporation, and Phoenix Technologies, Ltd.
ESCD may be updated during a Power-On-Self-Test (POST) or at runtime. For example, ESCD may be updated by POST if POST detects that a new Plug and Play bootable device is added to the computer system. ESCD information may be used by POST to allocate system resources to all configurable devices that are known to the system BIOS. System resources typically include Direct Memory Access (DMA) channels, Interrupt Request Lines (IRQ's), Input/Output (I/O) addresses, and memory. ESCD also may be updated during runtime by system software in order to effect configuration of devices on the next boot. An ESCD interface provides a mechanism for allowing system software to lock system resources allocated to specific devices in the system and thereby avoid system resource conflicts.
Updating ESCD in a conventional computer system has been dependent upon a segment selector from an operating system. The segment selector used by system BIOS to address an ESCD area of non-volatile storage is generated by the operating system. As a segment selector is exclusively configured for the memory map of the operating system, a segment selector loses meaning outside the context of the operating system memory map. A segment selector provided by an operating system also must be configured for the particular operating mode--real mode, 16-bit protected mode, or 32-bit protected mode--whichever is applicable. The segment selector in one operating mode is therefore different from the segment selector for another operating mode. Further, the need for a segment selector from an operating system to update ESCD has required a different selector if an ESCD area is relocated. Another drawback of using a segment selector from an operating system to read or write ESCD is the need to use a relatively slow bus within a computer system to reach the ESCD area of non-volatile storage.
ESCD has typically resided in a portion of a ROM treated as an option ROM. Option ROM represents a designated area of ROM space which an operating system preferably is programmed not to utilize. In certain operating modes, however, availability of an option ROM is not guaranteed. For example, during runtime in a 32-bit protected mode, an operating system may not provide a segment selector to an option ROM, thereby preventing access to the option ROM during runtime. In addition, the size of the ROM space for which an operating system provides a segment selector is limited.